/*
 * Copyright 2009 Tran Nhut Trung.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 */
package com.gdevelop.gwtxp.gen;


import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.Widget;

import java.util.Iterator;

public class TableCell extends SimplePanel implements HasWidgets{
  private int row;
  private int col;
  
  // FlexCellFormatter
  private int rowSpan;
  private int colSpan;
  
  // CellFormatter
  private String verticalAlignment;
  private String horizontalAlignment;
  private boolean wordWrap;

  // ColumnFormatter
  private String columnWidth;

  /**
   * Name of section, used for dataTable.
   */
  private String sectionName;

  public TableCell() {
  }

  public void add(Widget w) {
  }

  public void clear() {
  }

  public Iterator<Widget> iterator() {
    return null;
  }

  public boolean remove(Widget w) {
    return false;
  }

  public int getRow() {
    return row;
  }
  /**
   * Row number in table
   * @param row
   */
  public void setRow(int row) {
    this.row = row;
  }

  public int getCol() {
    return col;
  }
  /**
   * Column number in table
   * @param col
   */
  public void setCol(int col) {
    this.col = col;
  }

  public int getColSpan() {
    return colSpan;
  }
  /**
   * Column span
   * @param colSpan
   */
  public void setColSpan(int colSpan) {
    this.colSpan = colSpan;
  }

  public int getRowSpan() {
    return rowSpan;
  }
  /**
   * Row span
   * @param rowSpan
   */
  public void setRowSpan(int rowSpan) {
    this.rowSpan = rowSpan;
  }

  public String getHorizontalAlignment() {
    return horizontalAlignment;
  }
  /**
   * Horizontal alignment. Valid values: ALIGN_DEFAULT, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT
   * @param horizontalAlignment
   */
  public void setHorizontalAlignment(String horizontalAlignment) {
    this.horizontalAlignment = horizontalAlignment;
  }

  public String getVerticalAlignment() {
    return verticalAlignment;
  }
  /**
   * Vertical alignment, Valid values: ALIGN_TOP, ALIGN_MIDDLE, ALIGN_BOTTOM
   * @param verticalAlignment
   */
  public void setVerticalAlignment(String verticalAlignment) {
    this.verticalAlignment = verticalAlignment;
  }

  public boolean getWordWrap() {
    return wordWrap;
  }
  /**
   * Word wrap
   * @param wordWrap
   */
  public void setWordWrap(boolean wordWrap) {
    this.wordWrap = wordWrap;
  }

  public String getSectionName() {
    return sectionName;
  }

  public void setSectionName(String sectionName) {
    this.sectionName = sectionName;
  }

  public String getColumnWidth() {
    return columnWidth;
  }
  /**
   * Table column width
   * @param columnWidth
   */
  public void setColumnWidth(String columnWidth) {
    this.columnWidth = columnWidth;
  }
}
